﻿using EPiServer;
using EPiServer.DynamicContent;

namespace SocialPack.modules.SocialPack.DynamicContent.Google
{
    [DynamicContentPlugIn(
        DisplayName = "Google plus 1 Button",
        Description = "Displays Google plus 1 Button",
        ViewUrl = "~/modules/socialpack/dynamiccontent/google/plusonebutton.ascx")]
    public partial class PlusOneButton : UserControlBase
    {
        public int Width { get; set; }

        public string Language { get; set; }

        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            this.PlusOneButtonControl.Width = this.Width;

            if (!string.IsNullOrWhiteSpace(this.Language))
            {
                this.PlusOneButtonControl.Language = this.Language;
            }
        }
    }
}